
//package java_cup;

/** This class represents one row (corresponding to one machine state) of the 
 *  reduce-goto parse table. 
 */
public class ParseReduceRow {
    /*-----------------------------------------------------------*/
    /*--- Constructor(s) ----------------------------------------*/
    /*-----------------------------------------------------------*/

    /** Simple constructor. Note: this should not be used until the Count
     *  of terminals in the grammar has been established.
     */
    public ParseReduceRow() {
        /* make sure the Count is set */
        if (_size <= 0) _size = Vn.Count;

        /* allocate the array */
        under_non_term = new LALRState[ColumnCount];
    }

    /*-----------------------------------------------------------*/
    /*--- (Access to) Static (Class) Variables ------------------*/
    /*-----------------------------------------------------------*/

    /** Number of columns (non terminals) in every row. */
    public static int _size = 0;

    /** Number of columns (non terminals) in every row. */
    public static int ColumnCount => _size;
    //Hm Added clear  to clear AllVns static fields
    public static void clear() {
        _size = 0;
    }

    /*-----------------------------------------------------------*/
    /*--- (Access to) Instance Variables ------------------------*/
    /*-----------------------------------------------------------*/

    /** Actual entries for the row. */
    public LALRState[] under_non_term;
}

